<?php

require_once './core/p_pre.php';
process($db, $userId, $deviceId);
require_once './core/p_post.php';

function process(&$db, $userId, $deviceId) {
	require_once './core/dataset.php';
	
	$datasetId = param('datasetId');
	$lang = param('lang');
	if ( $datasetId < 1 || strlen($lang) < 1 ) {
		return;
	}

	require_once './core/message.php';
	$message = new UMessage();
	$message = UMessage::findByDatasetId($db, $datasetId, $lang);
	if ( $message && strlen($message->message) > 0 ) {
		echo $message->message;
	}
}
